<?php 
require_once '../kelas/amankanParam.php';
require_once '../kelas/fungsi.php';
require_once '../kelas/record.php';
require_once '../kelas/customer.php';
echo $objFungsi->buatJudul('Daftar Customer');
$dtGet=$objParamAman->getMethod();
$dtPost=$objParamAman->postMethod();
$hal = isset($dtGet['hal'])?$dtGet['hal']:0;
$perPage =10;
$perXHal = $hal*$perPage;
$dtCust = $objCustomer->getData($perPage,$perXHal);
$resultCust = $dtCust['result'];
$totalCust = $dtCust['total'];
?>
<div class="frame_table_order">
<table width="100%" cellpadding="5" cellspacing="0" border="1" style="border-collapse:collapse">

    <thead>
        <tr align="center" valign="middle" bgcolor="#CCCCCC">
		<td><span class="font_sub_judul_2">Nama</span></td>
		<td><span class="font_sub_judul_2">Alamat</span></td>
		<td><span class="font_sub_judul_2">Kota</span></td>
		<td>Telepon</td>
		<td>Email</td>
		<td>Tanggal Lahir</td>
		<td>Username</td>
		<td>Status</td>
		<td>Pilihan</td>
	</tr>
</thead>
<?php foreach ($resultCust as $vCust): ?>
	<tr>

		<td><?php echo $vCust['nama'] ?></td>
		<td><?php echo $objFungsi->readMore($vCust['alamat']); ?></td>
		<td><?php echo $vCust['kota'] ?></td>
		<td><?php echo $vCust['telepon'] ?></td>
		<td><?php echo $vCust['email'] ?></td>
		<td><?php echo $objFungsi->tanggal2($vCust['lahir']) ?></td>
		<td><?php echo $vCust['username'] ?></td>
		<td><?php echo $objCustomer->meanStatus($vCust['aktif']); ?></td>
		<td><a href="<?php echo BASEURL.'proses/pelanggan.php?on=aktifkan&id='.$vCust['id']."&aktif=".$vCust['aktif'] ?>" class="button_2"><?php echo $objFungsi->optAktifasi($vCust['aktif']); ?></a> </td>
	</tr>
<?php endforeach ?>
</table>
</div>